ALMaSS  1.0
The Animal, Landscape and Man Simulation System
Newt.h
Go to the documentation of this file.
1 /*
2 *******************************************************************************************************
3 Copyright (c) 2016, Christopher John Topping, Aarhus University
4 All rights reserved.
5 
6 Redistribution and use in source and binary forms, with or without modification, are permitted provided
7 that the following conditions are met:
8 
9 Redistributions of source code must retain the above copyright notice, this list of conditions and the
10 following disclaimer.
11 Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
12 the following disclaimer in the documentation and/or other materials provided with the distribution.
13 
14 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
15 IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
16 FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS
17 BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
18 BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
19 BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
20 LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
21 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
22 ********************************************************************************************************
23 */
31 //---------------------------------------------------------------------------
32 #ifndef NewtH
33 #define NewtH
34 //---------------------------------------------------------------------------
35 
36 #define __NewtDebug
37 
38 //---------------------------------------------------------------------------
39 
40 class Newt_Base;
42 
43 //------------------------------------------------------------------------------
48 {
49  tton_Egg = 0,
55 };
56 
57 //---------------------------------------------------------------------------
58 
61 {
77 };
78 
86 };
87 
89 class Newt_Base : public TAnimal {
97 public:
98  // Attributes
99  static double m_EggDevelopmentDDTotal;
102  static double m_EggMortalityChance;
104  static double m_AdultMortalityChance;
106  static bool m_test_pesticide_egg;
109 
110 protected:
111  // Attributes
115  unsigned m_Age;
117  vector<unsigned> m_pondlist;
124 public:
125  // Methods
127  Newt_Base(int a_x, int a_y, vector<unsigned> a_pond, Landscape* a_L, Newt_Population_Manager* a_NPM, bool a_reproinhib);
129  void Init(vector<unsigned> a_pond, Newt_Population_Manager* a_NPM, bool a_reproinhib);
131  void ReInit(int a_x, int a_y, vector<unsigned> a_pond, Landscape* a_L, Newt_Population_Manager* a_NPM, bool a_reproinhib);
133  ~Newt_Base();
135  virtual int WhatState() {
136  return m_CurrentNewtState;
137  }
140  return TTypeOfNewtState(-1);
141  }
144  return TTypeOfNewtState(-1);
145  }
147  void st_Dying( void );
149  virtual void BeginStep( void ) {
150  ;
151  }// NB this is not used in the Newt_Base code
153  virtual void Step( void ) {
154  ;
155  }
157  virtual void EndStep( void ) {
158  ;
159  }// NB this is not used in the Newt_Base code
161  unsigned GetAge() {
162  return m_Age;
163  }
165  void SetAge( unsigned a_age ) {
166  m_Age = a_age;
167  }
169  unsigned GetHomePond() {
170  return m_pondlist[ 0 ];
171  }
173  void SetHomePond( unsigned a_pond ) {
174  m_pondlist[ 0 ] = a_pond;
175  }
178 };
179 
187 class Newt_Egg : public Newt_Base
188 {
189 protected:
190  // Attributes
192  double m_AgeDegrees;
193 public:
194  // Attributes
196  static double m_EggPPPThreshold;
198  static double m_EggPPPElimRate;
201  // Methods
203  Newt_Egg(int a_x, int a_y, vector<unsigned> a_pond, Landscape* a_L, Newt_Population_Manager* a_NPM, bool a_reproinhib);
205  void ReInit(int a_x, int a_y, vector<unsigned> a_pond, Landscape* a_L, Newt_Population_Manager* a_NPM, bool a_reproinhib);
207  ~Newt_Egg();
209  virtual void Init();
211  virtual void Step( void );
214 protected:
215  // Methods
217  virtual TTypeOfNewtState st_Develop( void );
219  virtual TTypeOfNewtState st_NextStage( void );
220 };
221 
223 class Newt_Larva : public Newt_Egg
224 {
234 public:
235  // Attributes
237  static double m_LarvaPPPThreshold;
239  static double m_LarvaPPPElimRate;
243  static double m_LarvalFoodProportion;
249  static double m_LarvaDevelopmentTime;
253  static double m_LarvaMortalityChance;
254  // Methods
256  Newt_Larva(int a_x, int a_y, vector<unsigned> a_pond, Landscape* a_L, Newt_Population_Manager* a_NPM, unsigned a_age, bool a_reproinhib);
258  void ReInit(int a_x, int a_y, vector<unsigned> a_pond, Landscape* a_L, Newt_Population_Manager* a_NPM, unsigned a_age, bool a_reproinhib);
260  ~Newt_Larva();
262  virtual void Init(int a_age);
264  virtual void Step( void );
267 protected:
268  // Attributes
270  double m_LarvalSize;
271  // Methods
273  virtual TTypeOfNewtState st_Develop( void );
275  virtual TTypeOfNewtState st_NextStage( void );
276 };
277 
279 class Newt_Juvenile : public Newt_Base
280 {
307 public:
308  // Attributes
316  static double m_JuvenilePPPElimRate;
324  static int m_SimW;
326  static int m_SimH;
328  static double m_roadmortalityprob;
330  static int m_newtwalkspeed;
332  static int m_newtwalkstepsize;
340  static double m_NewtDormancyHumidity;
341  // Methods
343  Newt_Juvenile(int a_x, int a_y, vector<unsigned> a_pond, Landscape* a_L, Newt_Population_Manager* a_NPM, unsigned a_age, bool a_reproinhib);
345  ~Newt_Juvenile();
347  virtual void ReInit(int a_x, int a_y, vector<unsigned> a_pond, Landscape* a_L, Newt_Population_Manager* a_NPM, unsigned a_age, bool a_reproinhib);
349  virtual void Step( void );
351  double GetWeight() {
352  return m_weight;
353  }
355  void SetWeight( double a_weight ) {
356  m_weight = a_weight;
357  }
360 protected:
361  // Attributes
363  int m_InPond;
365  double m_weight;
367  unsigned m_OurVector;
372  // Methods
374  virtual TTypeOfNewtState st_Develop( void );
376  virtual TTypeOfNewtState st_EvaluateHabitat( void );
378  virtual TTypeOfNewtState st_Disperse( void );
380  virtual TTypeOfNewtState st_Overwinter( void );
382  virtual TTypeOfNewtState st_NextStage( void );
384  void MoveTo( TTypeDirectedWalk a_directedness, int a_stepsize, int a_steps );
386  void NewtDoWalking( int &a_vector, int a_stepsize, int a_steps, int &vx, int &vy );
388  void NewtDoWalkingCorrect( int &a_vector, int a_stepsize, int a_steps, int &vx, int &vy );
390  int NewtMoveQuality( int a_x, int a_y, TTypesOfLandscapeElement & a_tole);
391 };
392 
394 class Newt_Adult : public Newt_Juvenile {
408 public:
409  // Attributes
411  static double m_AdultPPPThreshold;
413  static double m_AdultPPPElimRate;
417  static unsigned m_AdultLifespan;
420  // Methods
422  Newt_Adult(int a_x, int a_y, vector<unsigned> a_pond, Landscape* a_L, Newt_Population_Manager* a_NPM, unsigned a_age, bool a_reproinhib);
424  ~Newt_Adult();
426  virtual void Init(int a_x, int a_y, vector<unsigned> a_pond, Landscape* a_L, Newt_Population_Manager* a_NPM, unsigned a_age);
428  virtual void ReInit(int a_x, int a_y, vector<unsigned> a_pond, Landscape* a_L, Newt_Population_Manager* a_NPM, unsigned a_age, bool a_reproinhib);
430  int GetInPond() {
431  return m_InPond;
432  }
434  void SetInPond() {
435  m_InPond = m_pondlist[0];
436  }
437 protected:
438  // Attributes
443  // Methods
445  void CalcMovementVector(void);
447  bool AgeMortTest(void);
449  virtual TTypeOfNewtState st_Develop(void);
451  virtual TTypeOfNewtState st_Disperse(void);
453  virtual TTypeOfNewtState st_Overwinter(void);
455  virtual TTypeOfNewtState st_Migrate(void);
457  virtual TTypeOfNewtState st_EvaluateHabitat(void);
458 };
459 
461 class Newt_Male : public Newt_Adult {
467 public:
469  Newt_Male(int a_x, int a_y, vector<unsigned> a_pond, Landscape* a_L, Newt_Population_Manager* a_NPM, unsigned a_age, bool a_reproinhib);
471  ~Newt_Male();
473  virtual void ReInit(int a_x, int a_y, vector<unsigned> a_pond, Landscape* a_L, Newt_Population_Manager* a_NPM, unsigned a_age, bool a_reproinhib);
475  virtual void BeginStep(void);
477  virtual void Step(void);
479  virtual TTypeOfNewtState st_Develop(void);
482 protected:
484  virtual TTypeOfNewtState st_EvaluateHabitat(void);
485 };
486 
489 class Newt_Female : public Newt_Adult {
499 public:
501  static unsigned m_eggproductionvolume;
503  static unsigned m_eggdailyproductionvolume;
505  Newt_Female(int a_x, int a_y, vector<unsigned> a_pond, Landscape* a_L, Newt_Population_Manager* a_NPM, unsigned a_age, bool a_reproinhib);
507  ~Newt_Female();
509  virtual void ReInit(int a_x, int a_y, vector<unsigned> a_pond, Landscape* a_L, Newt_Population_Manager* a_NPM, unsigned a_age, bool a_reproinhib);
511  virtual void Step(void);
514  m_eggsproduced = 0;
515  }
518 protected:
520  unsigned m_eggsproduced;
522  bool m_mated;
524  virtual TTypeOfNewtState st_Develop(void);
526  virtual TTypeOfNewtState st_Breed(void);
528  virtual TTypeOfNewtState st_EvaluateHabitat(void);
529 };
530 
531 #endif
TTypeDirectedWalk
Newt types of movement.
Definition: Newt.h:80
@ directedwalk_low
Definition: Newt.h:84
@ directedwalk_high
Definition: Newt.h:82
@ directedwalk_medium
Definition: Newt.h:83
@ directedwalk_totally
Definition: Newt.h:81
@ directedwalk_random
Definition: Newt.h:85
TTypesOfNewt
Definition: Newt.h:48
@ tton_Larva
Definition: Newt.h:50
@ tton_Foobar
Definition: Newt.h:54
@ tton_Juvenile
Definition: Newt.h:51
@ tton_Female
Definition: Newt.h:53
@ tton_Male
Definition: Newt.h:52
@ tton_Egg
Definition: Newt.h:49
TTypeOfNewtState
Newt behavioural states.
Definition: Newt.h:61
@ toNewts_NextStage
Definition: Newt.h:69
@ toNewts_Dispersal
Definition: Newt.h:71
@ toNewts_Migrate
Definition: Newt.h:72
@ toNewts_EvaluateLocation
Definition: Newt.h:68
@ toNewts_Develop
Definition: Newt.h:67
@ toNewts_Die
Definition: Newt.h:75
@ toNewts_Remove
Definition: Newt.h:70
@ toNewts_Breed
Definition: Newt.h:73
@ toNewts_Overwinter
Definition: Newt.h:74
@ toNewts_InitialState
Definition: Newt.h:66
@ toNewts_foobar
Definition: Newt.h:76
The landscape class containing all environmental and topographical data.
Definition: landscape.h:113
The newt adult class - contains behaviour and attributes common to adults but not juveniles.
Definition: Newt.h:394
virtual void ReInit(int a_x, int a_y, vector< unsigned > a_pond, Landscape *a_L, Newt_Population_Manager *a_NPM, unsigned a_age, bool a_reproinhib)
Used to re-use an object - must be implemented in descendent classes.
Definition: Newt.cpp:701
virtual TTypeOfNewtState st_Disperse(void)
Adult development state.
Definition: Newt.cpp:726
virtual TTypeOfNewtState st_Migrate(void)
Adult migration to pond state.
Definition: Newt.cpp:820
bool AgeMortTest(void)
Ages the adult and applies a daily mortality probability.
Definition: Newt.cpp:768
virtual TTypeOfNewtState st_EvaluateHabitat(void)
Adult evaluate habitat behaviour.
Definition: Newt.cpp:780
virtual void Init(int a_x, int a_y, vector< unsigned > a_pond, Landscape *a_L, Newt_Population_Manager *a_NPM, unsigned a_age)
Initialise object.
Definition: Newt.cpp:707
static double m_AdultPPPElimRate
The daily proportion of PPP body burden that is not eliminated for adults.
Definition: Newt.h:413
static double m_AdultPPPThreshold
The threshold for effect of PPP on adults.
Definition: Newt.h:411
virtual TTypeOfNewtState st_Overwinter(void)
Adult dormant state.
Definition: Newt.cpp:811
~Newt_Adult()
Newt_Male destructor.
Definition: Newt.cpp:696
static unsigned m_AdultLifespan
Definition: Newt.h:417
int GetInPond()
Returns the current pond status (-1 if not in pond else the pond ref is returned)
Definition: Newt.h:430
static int m_newtadultwalkspeed
The max walking speed of a newt.
Definition: Newt.h:419
void CalcMovementVector(void)
Calculates the direction needed to move in to get to the target pond.
Definition: Newt.cpp:874
int m_targetpondx
x-coord of a target pond
Definition: Newt.h:440
void SetInPond()
Forces setting the in pond status to the first pond ref - used only on start-up.
Definition: Newt.h:434
Newt_Adult(int a_x, int a_y, vector< unsigned > a_pond, Landscape *a_L, Newt_Population_Manager *a_NPM, unsigned a_age, bool a_reproinhib)
Newt_Adult constructor.
Definition: Newt.cpp:689
int m_targetpondy
y-coord of a target pond
Definition: Newt.h:442
virtual TTypeOfNewtState st_Develop(void)
Adult development state.
Definition: Newt.cpp:751
static double m_AdultPPPEffectProbability
The daily probability of effect if above m_AdultPPPThreshold for adults.
Definition: Newt.h:415
The base class for all newts containing common attributes and behaviour for descendent types.
Definition: Newt.h:89
static double m_EggDevelopmentDDTotal
Definition: Newt.h:99
TTypeOfNewtState st_Movement(void)
Behavioural state movement - does nothing in the base class.
Definition: Newt.h:143
static bool m_test_pesticide_egg
Flags to record whether we are in pesticide testing mode.
Definition: Newt.h:106
static bool m_test_pesticide_terrestrial
Definition: Newt.h:108
virtual void Step(void)
The Step is the second 'part' of the timestep that an animal can behave in. It is called continuously...
Definition: Newt.h:153
static double m_JuvenileMortalityChance
Definition: Newt.h:103
unsigned GetHomePond()
A typical interface function - this one returns the home pond reference as an unsigned integer.
Definition: Newt.h:169
static double m_EggMortalityChance
Definition: Newt.h:102
virtual void EndStep(void)
The EndStep is the third 'part' of the timestep that an animal can behave in. It is called once per t...
Definition: Newt.h:157
TTypeOfNewtState m_CurrentNewtState
Variable to record current behavioural state.
Definition: Newt.h:113
virtual int WhatState()
Returns the state number for display purposes.
Definition: Newt.h:135
void SetHomePond(unsigned a_pond)
A typical interface function - this one sets the home pond reference as an unsigned integer.
Definition: Newt.h:173
void InternalPesticideHandlingAndResponse(double)
For handlng of class-specific pesticide effects.
Definition: Newt.h:177
static double m_AdultMortalityChance
Definition: Newt.h:104
bool m_reproductiveinhibition
A flag to indicate environmentally induced reproductive inhibition (value is inherited by descendent ...
Definition: Newt.h:123
void Init(vector< unsigned > a_pond, Newt_Population_Manager *a_NPM, bool a_reproinhib)
Intitialise object.
Definition: Newt.cpp:72
static double m_JuvenileDevelopmentSize
Definition: Newt.h:101
static double m_EggDevelopmentDDParameter
Definition: Newt.h:100
unsigned GetAge()
A typical interface function - this one returns the Age as an unsigned integer.
Definition: Newt.h:161
Newt_Population_Manager * m_OurPopulationManager
This is a time saving pointer to the correct population manager object.
Definition: Newt.h:119
TTypeOfNewtState st_Develop(void)
Behavioural state development - does nothing in the base class.
Definition: Newt.h:139
unsigned m_Age
Definition: Newt.h:115
~Newt_Base()
Newt destructor.
Definition: Newt.cpp:81
vector< unsigned > m_pondlist
Definition: Newt.h:117
Newt_Base(int a_x, int a_y, vector< unsigned > a_pond, Landscape *a_L, Newt_Population_Manager *a_NPM, bool a_reproinhib)
Newt constructor.
Definition: Newt.cpp:59
static bool m_test_pesticide_larva
Definition: Newt.h:107
double m_body_burden
The current PPP body burden for use in pesticide testing mode.
Definition: Newt.h:121
void ReInit(int a_x, int a_y, vector< unsigned > a_pond, Landscape *a_L, Newt_Population_Manager *a_NPM, bool a_reproinhib)
ReInit for object pool.
Definition: Newt.cpp:65
void st_Dying(void)
Behavioural state dying.
Definition: Newt.cpp:87
virtual void BeginStep(void)
The BeginStep is the first 'part' of the timestep that an animal can behave in. It is called once per...
Definition: Newt.h:149
void SetAge(unsigned a_age)
A typical interface function - this one sets the Age as an unsigned integer.
Definition: Newt.h:165
The newt egg class - in pond.
Definition: Newt.h:188
Newt_Egg(int a_x, int a_y, vector< unsigned > a_pond, Landscape *a_L, Newt_Population_Manager *a_NPM, bool a_reproinhib)
Newt_Egg constructor.
Definition: Newt.cpp:97
static double m_EggPPPEffectProbability
The daily probability of effect if above m_EggPPPThreshold for eggs.
Definition: Newt.h:200
double m_AgeDegrees
Definition: Newt.h:192
virtual void Init()
Newt_Egg Initialisation.
Definition: Newt.cpp:115
~Newt_Egg()
Newt destructor.
Definition: Newt.cpp:103
virtual void Step(void)
Newt_Egg Step code. This is called continuously until all animals report that they are 'DONE'.
Definition: Newt.cpp:121
virtual TTypeOfNewtState st_NextStage(void)
Egg hatch.
Definition: Newt.cpp:180
static double m_EggPPPElimRate
The daily proportion of PPP body burden that is not eliminated for eggs.
Definition: Newt.h:198
static double m_EggPPPThreshold
The threshold for effect of PPP on eggs.
Definition: Newt.h:196
void ReInit(int a_x, int a_y, vector< unsigned > a_pond, Landscape *a_L, Newt_Population_Manager *a_NPM, bool a_reproinhib)
ReInit for object pool.
Definition: Newt.cpp:109
virtual TTypeOfNewtState st_Develop(void)
Behavioural state development.
Definition: Newt.cpp:149
void InternalPesticideHandlingAndResponse()
For handlng of class-specific pesticide effects.
Definition: Newt.cpp:1168
The newt female class.
Definition: Newt.h:489
Newt_Female(int a_x, int a_y, vector< unsigned > a_pond, Landscape *a_L, Newt_Population_Manager *a_NPM, unsigned a_age, bool a_reproinhib)
Newt_Female constructor.
Definition: Newt.cpp:983
static unsigned m_eggdailyproductionvolume
Parameter - holds the number of eggs produced per day during breeding.
Definition: Newt.h:503
virtual TTypeOfNewtState st_Develop(void)
Male development state.
Definition: Newt.cpp:1049
~Newt_Female()
Newt_Female destructor.
Definition: Newt.cpp:993
virtual TTypeOfNewtState st_EvaluateHabitat(void)
Adult evaluate habitat behaviour - augmenting the adult behaviour.
Definition: Newt.cpp:1120
bool m_mated
Flag showing mating status, true means mated this season.
Definition: Newt.h:522
static unsigned m_eggproductionvolume
Parameter - holds the max number of eggs that can be produced during breeding.
Definition: Newt.h:501
virtual void Step(void)
Newt_Female Step code. This is called continuously until all animals report that they are 'DONE'.
Definition: Newt.cpp:1006
virtual void ReInit(int a_x, int a_y, vector< unsigned > a_pond, Landscape *a_L, Newt_Population_Manager *a_NPM, unsigned a_age, bool a_reproinhib)
Used to re-use an object - must be implemented in descendent classes.
Definition: Newt.cpp:999
void ResetEggProduction()
Definition: Newt.h:513
virtual TTypeOfNewtState st_Breed(void)
Female breeding in pond.
Definition: Newt.cpp:1067
unsigned m_eggsproduced
Holds the number of eggs produced during breeding.
Definition: Newt.h:520
void InternalPesticideHandlingAndResponse()
For handlng of class-specific pesticide effects.
Definition: Newt.cpp:1310
The newt juvenile class - free living but not reproductive.
Definition: Newt.h:280
static int m_SimW
The width of the simulation map, stored for fast access.
Definition: Newt.h:324
static double m_roadmortalityprob
The probability of death when crossing a road.
Definition: Newt.h:328
double m_weight
Definition: Newt.h:365
virtual TTypeOfNewtState st_Overwinter(void)
Juvenile overwintering state.
Definition: Newt.cpp:500
static double m_JuvenilePPPElimRate
The daily proportion of PPP body burden that is not eliminated for juveniles.
Definition: Newt.h:316
int NewtMoveQuality(int a_x, int a_y, TTypesOfLandscapeElement &a_tole)
Tests the habitat quality for a square to move to.
Definition: Newt.cpp:648
static double m_JuvenilePPPEffectProbability_EnvConc
The daily probability of effect if above m_JuvenilePPPThreshold for juveniles for environmental conce...
Definition: Newt.h:318
virtual TTypeOfNewtState st_EvaluateHabitat(void)
Juvenile evaluate habitat behaviour.
Definition: Newt.cpp:472
int m_InPond
The polyrefindex for the pond the newt is in, or -1 if not in a pond.
Definition: Newt.h:363
static int m_newtwalkstepsize
The size of a step when evaluating habitat during walking.
Definition: Newt.h:332
static double m_JuvenilePPPThreshold_Overspray
The overspray threshold for effect of PPP on juveniles.
Definition: Newt.h:314
static double m_JuvenilePPPEffectProbability_Overspray
The daily probability of effect if above m_JuvenilePPPThreshold for juveniles for overspray.
Definition: Newt.h:320
virtual void Step(void)
Newt_Juvenile Step code. This is called continuously until all animals report that they are 'DONE'.
Definition: Newt.cpp:353
static double m_poorhabitatdispersalprob
Probability of dispersal in poor habitat.
Definition: Newt.h:336
TTypesOfLandscapeElement m_CurrentHabitat
The current habitat type the newt is in.
Definition: Newt.h:369
static int m_newtwalkspeed
The max walking speed of a newt.
Definition: Newt.h:330
bool m_forcedisperse
A flag to force dispersal from the breeding ponds.
Definition: Newt.h:371
void InternalPesticideHandlingAndResponse()
For handlng of class-specific pesticide effects.
Definition: Newt.cpp:1228
static double m_NewtDormancyHumidity
Temperature in degrees that the newts become dormant.
Definition: Newt.h:340
Newt_Juvenile(int a_x, int a_y, vector< unsigned > a_pond, Landscape *a_L, Newt_Population_Manager *a_NPM, unsigned a_age, bool a_reproinhib)
Newt_Juvenile constructor.
Definition: Newt.cpp:326
static double m_JuvenilePPPThreshold_EnvConc
The environmental concentration threshold for effect of PPP on juveniles.
Definition: Newt.h:312
virtual TTypeOfNewtState st_NextStage(void)
Juvenile maturation.
Definition: Newt.cpp:391
unsigned m_OurVector
The last direction we moved in.
Definition: Newt.h:367
virtual TTypeOfNewtState st_Develop(void)
Juvenile development state.
Definition: Newt.cpp:412
static double m_JuvenileDailyWeightGain
Used in determining daily growth.
Definition: Newt.h:322
static double m_JuvenilePPPThreshold_Min
The minimum threshold for effect of PPP on juveniles.
Definition: Newt.h:310
void NewtDoWalking(int &a_vector, int a_stepsize, int a_steps, int &vx, int &vy)
This method moves the newt through the landscape.
Definition: Newt.cpp:542
~Newt_Juvenile()
Newt_Juvenile destructor.
Definition: Newt.cpp:338
static int m_SimH
The height of the simulation map, stored for fast access.
Definition: Newt.h:326
void MoveTo(TTypeDirectedWalk a_directedness, int a_stepsize, int a_steps)
Top level control of newt movement.
Definition: Newt.cpp:509
void NewtDoWalkingCorrect(int &a_vector, int a_stepsize, int a_steps, int &vx, int &vy)
This method moves the newt through the landscape using wrap around corrects.
Definition: Newt.cpp:595
void SetWeight(double a_weight)
Set method for m_weight.
Definition: Newt.h:355
static double m_goodhabitatdispersalprob
Probability of dispersal in good habitat.
Definition: Newt.h:334
static double m_NewtDormancyTemperature
Temperature in degrees that the newts become dormant.
Definition: Newt.h:338
virtual void ReInit(int a_x, int a_y, vector< unsigned > a_pond, Landscape *a_L, Newt_Population_Manager *a_NPM, unsigned a_age, bool a_reproinhib)
Used to re-use an object - must be implemented in descendent classes.
Definition: Newt.cpp:344
virtual TTypeOfNewtState st_Disperse(void)
Juvenile dispersal state.
Definition: Newt.cpp:448
double GetWeight()
Get method for m_weight.
Definition: Newt.h:351
The newt larva class - in pond.
Definition: Newt.h:224
virtual void Step(void)
Newt_Larva Step code. This is called continuously until all animals report that they are 'DONE'.
Definition: Newt.cpp:272
static double m_LarvaDevelopmentTime
The time before a larva can undergo metamorphosis.
Definition: Newt.h:249
Newt_Larva(int a_x, int a_y, vector< unsigned > a_pond, Landscape *a_L, Newt_Population_Manager *a_NPM, unsigned a_age, bool a_reproinhib)
Newt_Larva constructor.
Definition: Newt.cpp:203
static double m_LarvaDevelopmentUpperSz
The upper size at which larvae will undergo metamorphosis.
Definition: Newt.h:245
static double m_LarvaPPPThreshold
The threshold for effect of PPP on larvae.
Definition: Newt.h:237
static double m_NewtLarvaDailyGrowthIncrement
The daily growth increment if a larva survives to grow that day.
Definition: Newt.h:251
void ReInit(int a_x, int a_y, vector< unsigned > a_pond, Landscape *a_L, Newt_Population_Manager *a_NPM, unsigned a_age, bool a_reproinhib)
ReInit for object pool.
Definition: Newt.cpp:218
static double m_LarvaPPPElimRate
The daily proportion of PPP body burden that is not eliminated for larvae.
Definition: Newt.h:239
~Newt_Larva()
Newt_Larva destructor.
Definition: Newt.cpp:212
static double m_LarvaMortalityChance
The daily probability of death from unspecified causes for a larva.
Definition: Newt.h:253
virtual TTypeOfNewtState st_Develop(void)
Larva development state.
Definition: Newt.cpp:232
double m_LarvalSize
Holds the size of the larva, we are assuming length is the critical measure as with the adults.
Definition: Newt.h:270
static double m_LarvaDevelopmentLowerSz
The lower size below which larvae cannot undergo metamorphosis.
Definition: Newt.h:247
virtual TTypeOfNewtState st_NextStage(void)
Larva metamorphosis.
Definition: Newt.cpp:300
void InternalPesticideHandlingAndResponse()
For handlng of class-specific pesticide effects.
Definition: Newt.cpp:1198
static double m_LarvaPPPEffectProbability
The daily probability of effect if above m_LarvaPPPThreshold for larvae.
Definition: Newt.h:241
static double m_LarvalFoodProportion
Holds the parameter value for the proportion of food eaten per day relative to size.
Definition: Newt.h:243
The newt male class.
Definition: Newt.h:461
void InternalPesticideHandlingAndResponse()
For handlng of class-specific pesticide effects.
Definition: Newt.cpp:1280
virtual void BeginStep(void)
Newt_Male BeingStep code. Called once per timestep, this only records pond presence.
Definition: Newt.cpp:906
virtual void ReInit(int a_x, int a_y, vector< unsigned > a_pond, Landscape *a_L, Newt_Population_Manager *a_NPM, unsigned a_age, bool a_reproinhib)
Used to re-use an object - must be implemented in descendent classes.
Definition: Newt.cpp:901
~Newt_Male()
Newt_Male destructor.
Definition: Newt.cpp:896
Newt_Male(int a_x, int a_y, vector< unsigned > a_pond, Landscape *a_L, Newt_Population_Manager *a_NPM, unsigned a_age, bool a_reproinhib)
Newt_Male constructor.
Definition: Newt.cpp:891
virtual void Step(void)
Newt_Male Step code. This is called continuously until all animals report that they are 'DONE'.
Definition: Newt.cpp:916
virtual TTypeOfNewtState st_EvaluateHabitat(void)
Adult evaluate habitat behaviour.
Definition: Newt.cpp:974
virtual TTypeOfNewtState st_Develop(void)
Male development state.
Definition: Newt.cpp:956
The class to handle all newt population related matters.
Definition: Newt_Population_Manager.h:72
The base class for all ALMaSS animal classes.
Definition: PopulationManager.h:205
TTypesOfLandscapeElement
Definition: tole_declaration.h:36